/*
Copyright (c) [2019年5月1日] [吴超]
[MBT_studio] is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
		 http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
See the Mulan PSL v2 for more details.
*/
#pragma once


#include "节点/节点.h"
#include "节点/输入输出节点.h"


class API_EXPORT C_笔刷节点 : public C_节点基类 {

public:
	C_笔刷节点(S_设备环境& ctx);
	~C_笔刷节点();

	S_Props		m_本地线程数量;

	//bool		f_update();
	std::string DEF_节点编译函数;

	S_Props		m_线程调度方式;
	S_Props		m_笔刷类型;

	void			f_读取(FILE* f);
	void			f_写入(FILE* f);
	//S_物体* f_get虚拟体();
	//void	f_入回收();
	//void	f_回收();

	//void    f_Copy(const C_节点基类* node);
protected:
	bool		m_是否链接;

};

C_节点基类* f_node_创建笔刷节点(S_设备环境& ctx, C_节点树* 子节点树);
C_节点基类* f_node_加载笔刷节点(S_设备环境& ctx, FILE* f);
void		f_node_保存笔刷节点(C_节点基类* n, FILE* f);




class API_EXPORT C_毛笔纹理笔刷节点 : public C_节点基类 {
	S_GPU参数槽		m_参数;

public:
	C_毛笔纹理笔刷节点(S_设备环境& ctx);
	~C_毛笔纹理笔刷节点();

	S_Props		m_清除;
	S_Props		m_填充颜色;
	S_Props		m_线程调度方式;
	S_Props		m_笔刷类型;

	//bool		f_update();
	std::string DEF_节点编译函数;

	void			f_读取(FILE* f);
	void			f_写入(FILE* f);
	//S_物体* f_get虚拟体();
	//void	f_入回收();
	//void	f_回收();

	//void    f_Copy(const C_节点基类* node);
protected:
	bool		m_是否链接;

};

C_节点基类* f_node_创建毛笔纹理笔刷节点(S_设备环境& ctx, C_节点树* 子节点树);
C_节点基类* f_node_加载毛笔纹理笔刷节点(S_设备环境& ctx, FILE* f);
void		f_node_保存毛笔纹理笔刷节点(C_节点基类* n, FILE* f);




class API_EXPORT C_设置纹理像素节点 : public C_节点基类 {

public:
	C_设置纹理像素节点(S_设备环境& ctx);
	~C_设置纹理像素节点();

	S_Props		m_叠加类型;

	//bool		f_update();
	std::string DEF_节点编译函数;

	void			f_读取(FILE* f);
	void			f_写入(FILE* f);
	//S_物体* f_get虚拟体();
	//void	f_入回收();
	//void	f_回收();

	//void    f_Copy(const C_节点基类* node);
protected:
	bool		m_是否链接;

};

C_节点基类* f_node_创建设置纹理像素节点(S_设备环境& ctx, C_节点树* 子节点树);
C_节点基类* f_node_加载设置纹理像素节点(S_设备环境& ctx, FILE* f);
void		f_node_保存设置纹理像素节点(C_节点基类* n, FILE* f);





